package com.autism.day03;

public class DemoMain {
    public static void main(String[] args) {
        Computer computer = new Computer();
        computer.powerOn();

        //准备一个鼠标,向上转型
        USB mouse = new Mouse();
        computer.useDevice(mouse);

        //准备一个键盘
        KeyBoard keyboard = new KeyBoard();
        computer.useDevice(keyboard);

        computer.powerOff();
    }
}
